package com.yicong.ants.bean;



/**
 * 支付订单数据Bean
 */

public class PayOrderParamsBean {
    /**
     * 订单金额
     */
    private float amount;
    /**
     * 支付类型,可选参数支付宝为alipay,微信支付为wechat
     */
    private String type;
    /**
     * 支付方式,支付宝可选参数web,wap,app,scan,pos,
     * 微信支付可选参数mp,wap,app,scan,pos,miniapp
     */
    private String method;
    /**
     * 订单号
     */
    private String ordersn;
    /**
     * 商品名称
     */
    private String subject;
    private String category;

    public PayOrderParamsBean(float amount, String type, String method, String ordersn, String subject) {
        this.amount = amount;
        this.type = type;
        this.method = method;
        this.ordersn = ordersn;
        this.subject = subject;
    }

    @Override
    public String toString() {
        return "PayOrderParamsBean{" +
            "amount=" + amount +
            ", type='" + type + '\'' +
            ", method='" + method + '\'' +
            ", ordersn='" + ordersn + '\'' +
            ", subject='" + subject + '\'' +
            '}';
    }

    public float getAmount() {
        return this.amount;
    }

    public String getType() {
        return this.type;
    }

    public String getMethod() {
        return this.method;
    }

    public String getOrdersn() {
        return this.ordersn;
    }

    public String getSubject() {
        return this.subject;
    }

    public String getCategory() {
        return this.category;
    }

    public PayOrderParamsBean setAmount(float amount) {
        this.amount = amount;
        return this;
    }

    public PayOrderParamsBean setType(String type) {
        this.type = type;
        return this;
    }

    public PayOrderParamsBean setMethod(String method) {
        this.method = method;
        return this;
    }

    public PayOrderParamsBean setOrdersn(String ordersn) {
        this.ordersn = ordersn;
        return this;
    }

    public PayOrderParamsBean setSubject(String subject) {
        this.subject = subject;
        return this;
    }

    public PayOrderParamsBean setCategory(String category) {
        this.category = category;
        return this;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof PayOrderParamsBean)) return false;
        final PayOrderParamsBean other = (PayOrderParamsBean) o;
        if (!other.canEqual((Object) this)) return false;
        if (Float.compare(this.getAmount(), other.getAmount()) != 0) return false;
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
        final Object this$method = this.getMethod();
        final Object other$method = other.getMethod();
        if (this$method == null ? other$method != null : !this$method.equals(other$method))
            return false;
        final Object this$ordersn = this.getOrdersn();
        final Object other$ordersn = other.getOrdersn();
        if (this$ordersn == null ? other$ordersn != null : !this$ordersn.equals(other$ordersn))
            return false;
        final Object this$subject = this.getSubject();
        final Object other$subject = other.getSubject();
        if (this$subject == null ? other$subject != null : !this$subject.equals(other$subject))
            return false;
        final Object this$category = this.getCategory();
        final Object other$category = other.getCategory();
        if (this$category == null ? other$category != null : !this$category.equals(other$category))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PayOrderParamsBean;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + Float.floatToIntBits(this.getAmount());
        final Object $type = this.getType();
        result = result * PRIME + ($type == null ? 43 : $type.hashCode());
        final Object $method = this.getMethod();
        result = result * PRIME + ($method == null ? 43 : $method.hashCode());
        final Object $ordersn = this.getOrdersn();
        result = result * PRIME + ($ordersn == null ? 43 : $ordersn.hashCode());
        final Object $subject = this.getSubject();
        result = result * PRIME + ($subject == null ? 43 : $subject.hashCode());
        final Object $category = this.getCategory();
        result = result * PRIME + ($category == null ? 43 : $category.hashCode());
        return result;
    }
}
